package com.cxf.windex.enums;

public enum TypeEnum {
  GUEST("0", "游客"),
  VIP("1", "会员"),
  ADMIN("2", "管理员");

  private final String key;
  private final String desc;

  private TypeEnum(String key, String desc) {
    this.key = key;
    this.desc = desc;
  }

  public static TypeEnum getIdType(String idType) {
    TypeEnum[] its = values();
    TypeEnum[] arr$ = its;
    int len$ = its.length;

    for(int i$ = 0; i$ < len$; ++i$) {
      TypeEnum it = arr$[i$];
      if (it.getKey() .equals( idType)) {
        return it;
      }
    }

    return GUEST;
  }

  public String getKey() {
    return this.key;
  }

  public String getDesc() {
    return this.desc;
  }
}
